<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php
/**
 * @see Mage_Page_Block_Template_Links
 */
 $page = new Mage_Page_Block_Html_Header();
$welCome = $page->getWelcome();
?>
<?php $_cartQty = Mage::getSingleton('checkout/cart')->getSummaryQty()?Mage::getSingleton('checkout/cart')->getSummaryQty():'0'; ?>
<?php $_links = $this->getLinks(); ?>
<?php if(count($_links)>0): ?>
<ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>>
     <li class="welcome">
            <?php echo $page->getWelcome()?></li>
	<?php foreach($_links as $_link): ?>
        <?php if ($_link instanceof Mage_Core_Block_Abstract):?>
            <?php echo $_link->toHtml() ?>
        <?php else: ?>
            <li<?php if($_link->getIsFirst()||$_link->getIsLast()): ?> class="<?php if($_link->getIsFirst()): ?>first<?php endif; ?><?php if($_link->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li>
        <?php endif;?>
    <?php endforeach; ?>
	<?php 
			$_subtotals = Mage::getSingleton('checkout/cart')->getQuote()->getTotals();
			$subtotal = $_subtotals["subtotal"]->getValue();
	?>
	<?php $_classcountfirst="";if ($subtotal==0){$_classcountfirst="<span>";}?>
	<?php $stringcart ='&nbsp;'.$_lasscountfirst. Mage::helper('checkout')->formatPrice($subtotal); ?>
	<?php //echo $this->__('<li class="li-top-link-cart"><a href="%s" class="top-link-cart" id="topcartlink"><span>your cart :</span> %s item(s) </a></li>', $this->getUrl('checkout/cart'),$cartQty) ?>
	<li class="li-top-link-cart" ><?php echo $this->__('<span>Shopping cart</span><a href="%s" class="top-link-cart" id="topcartlink"> %s item(s)%s </a>', $this->getUrl('checkout/cart'), $_cartQty,$stringcart) ?></li>
</ul>
<?php endif; ?>
